Skip to content

Conversation

@ogham
Copy link
Contributor

@ogham ogham commented Nov 24, 2014

All of the enum components had a redundant 'Type' specifier: TypeSymlink, TypeDirectory, TypeFile. This change removes them, replacing them with a namespace: FileType::Symlink, FileType::Directory, and FileType::RegularFile.

RegularFile is used instead of just File, as File by itself could be mistakenly thought of as referring to the struct.

Part of #19253.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

@brson
Copy link
Contributor

brson commented Nov 24, 2014

Seems right to me. Can you rebase and add [breaking-change] to the last line of the commit message?

cc @aturon @alexcrichton Do we want to leave the old values in place, deprecated?

All of the enum components had a redundant 'Type' specifier: TypeSymlink, TypeDirectory, TypeFile. This change removes them, replacing them with a namespace: FileType::Symlink, FileType::Directory, and FileType::RegularFile.

RegularFile is used instead of just File, as File by itself could be mistakenly thought of as referring to the struct.

[breaking-change]
@ogham
Copy link
Contributor Author

ogham commented Nov 24, 2014

Rebased.

@alexcrichton
Copy link
Member

Thanks @ogham! I think it's ok to not leave these deprecated for now, they're not too super widely used anyway.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Nov 27, 2014
All of the enum components had a redundant 'Type' specifier: TypeSymlink, TypeDirectory, TypeFile. This change removes them, replacing them with a namespace: FileType::Symlink, FileType::Directory, and FileType::RegularFile.

RegularFile is used instead of just File, as File by itself could be mistakenly thought of as referring to the struct.

Part of rust-lang#19253.
@bors bors merged commit 3b9dfd6 into rust-lang:master Nov 27, 2014
@ogham ogham deleted the rename-file-types branch November 27, 2014 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants